#pragma once
#ifndef COLOR_H_
#define COLOR_H_

#include "sdl.h"
#include "Vector3.h"
#include "Vector4.h"
#include "CommonInclude.h"

namespace EPOC
{

	class ColorRGB
	{
	public:
		

		ColorRGB() : m_nRed(0), m_nGreen(0), m_nBlue(0){};
		ColorRGB(Uint8 nRed, Uint8 nGreen, Uint8 nBlue) : m_nRed(nRed), m_nGreen(nGreen), m_nBlue(nBlue){};

		inline Vector3 ToVector3()
		{
			Vector3 color;
			color.m_fX = (float)m_nRed/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fY = (float)m_nGreen/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fZ = (float)m_nBlue/(float)MAX_COLOR_VALUE_AS_UNIT8;

			return color;
		}

	public:
		Uint8 m_nRed;
		Uint8 m_nGreen;
		Uint8 m_nBlue;
	
	}; // class ColorRGB
}; // namespace EPOC

namespace EPOC
{
	class ColorRGBA
	{
	public:
		ColorRGBA() : m_nRed(0), m_nGreen(0), m_nBlue(0), m_nAlpha(255){};
		ColorRGBA(Uint8 nRed, Uint8 nGreen, Uint8 nBlue, Uint8 nAlpha = 255) : m_nRed(nRed), m_nGreen(nGreen), m_nBlue(nBlue), m_nAlpha(nAlpha){};

		inline Vector3 ToVector3()
		{
			Vector3 color;
			color.m_fX = (float)m_nRed/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fY = (float)m_nGreen/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fZ = (float)m_nBlue/(float)MAX_COLOR_VALUE_AS_UNIT8;

			return color;
		}

		inline Vector4 ToVector4()
		{
			Vector4 color;
			color.m_fX = (float)m_nRed/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fY = (float)m_nGreen/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fZ = (float)m_nBlue/(float)MAX_COLOR_VALUE_AS_UNIT8;
			color.m_fW = (float)m_nAlpha/(float)MAX_COLOR_VALUE_AS_UNIT8;

			return color;
		}
	public:
		Uint8 m_nRed;
		Uint8 m_nGreen;
		Uint8 m_nBlue;
		Uint8 m_nAlpha;
	
	}; // class ColorRGBA
}; // namespace EPOC

#endif